using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Markup;

namespace Infralution.Localization.Wpf
{
	public partial class CultureSelectWindow : Window, IComponentConnector
	{
		private class Class226 : Comparer<CultureInfo>
		{
			public override int Compare(CultureInfo x, CultureInfo y)
			{
				return x.DisplayName.CompareTo(y.DisplayName);
			}
		}

		internal ComboBox comboBox_0;

		private bool bool_0;

		public CultureSelectWindow()
		{
			InitializeComponent();
			List<CultureInfo> list = new List<CultureInfo>
			{
				new CultureInfo("de-DE"),
				new CultureInfo("fr-FR"),
				new CultureInfo("ru-RU"),
				new CultureInfo("tr-TR"),
				new CultureInfo("zh-Hans"),
				new CultureInfo("ko"),
				new CultureInfo("en-US"),
				new CultureInfo("es-ES"),
				new CultureInfo("it-IT")
			};
			list.Sort(new Class226());
			comboBox_0.ItemsSource = list;
			comboBox_0.SelectedItem = CultureManager1.UICulture;
		}

		private void comboBox_0_SelectionChanged(object sender, SelectionChangedEventArgs e)
		{
			CultureManager1.UICulture = comboBox_0.SelectedItem as CultureInfo;
		}
		/*
		[DebuggerNonUserCode]
		[GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
		public void InitializeComponent()
		{
			if (!bool_0)
			{
				bool_0 = true;
				Uri resourceLocator = new Uri("/Hearthbuddy;component/localization/wpf/cultureselectwindow.xaml", UriKind.Relative);
				Application.LoadComponent(this, resourceLocator);
			}
		}

		[DebuggerNonUserCode]
		[GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
		[EditorBrowsable(EditorBrowsableState.Never)]
		void IComponentConnector.Connect(int connectionId, object target)
		{
			if (connectionId == 1)
			{
				comboBox_0 = (ComboBox)target;
				comboBox_0.SelectionChanged += comboBox_0_SelectionChanged;
			}
			else
			{
				bool_0 = true;
			}
		}*/
	}
}
